<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>DOM操作</title>
    </head>
    <body>
        <button onclick="addMoney()">点我变富有</button>
        <hr>

        <script>
            function addMoney(){
                let imgE = document.createElement('img');//<img><img>
                imgE.src = "img/money.jpg";//<img src=""></img>
                imgE.width = 200;//<img src="" width=""></img>
                let bodyE = document.querySelector('body');//找到body元素
                bodyE.append(imgE);//把imgE元素追加到body元素后面
            }
        </script>
    </body>

</html>